#! /bin/bash

if [ $# -eq 0 ]
then
  echo 'Usage: test a[dd]'
  echo 'or test EXECUTABLE TESTNAME'
  echo 'or test EXECUTABLE a[ll]'
  exit 1
fi
if [ $1 == add -o $1 == a ]
then
  cd .test
  ./add-test.py 
elif [ $2 == a -o $2 == all ]
then
  cp $1 .test/exec
  cd .test
  for testname in `ls in`
  do ./run-test.sh exec $testname
  done
else
  cp $1 .test/exec
  cd .test
  ./run-test.sh exec $2
fi


